<HTML><HEAD><TITLE>max_flow(+Graph, +CapacityArg, +SourceNode, +SinkNode, -MaxFlowValue, -MaxFlowEdges, -MaxFlowEdgesGraph)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(max_flow)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>max_flow(+Graph, +CapacityArg, +SourceNode, +SinkNode, -MaxFlowValue, -MaxFlowEdges, -MaxFlowEdgesGraph)</H1>
Ford-Fulkerson maximum flow algorithm
<DL>
<DT><EM>Graph</EM></DT>
<DD>a graph structure, no parallel edges, e(Src,Dest,EdgeData)
</DD>
<DT><EM>CapacityArg</EM></DT>
<DD>which argument of EdgeData to use as edge capacity (integer), (0 if EdgeData is a single number and -1 if every edge capacity is 1)
</DD>
<DT><EM>SourceNode</EM></DT>
<DD>source node number (integer)
</DD>
<DT><EM>SinkNode</EM></DT>
<DD>sink node number (integer)
</DD>
<DT><EM>MaxFlowValue</EM></DT>
<DD>value of the maximum flow
</DD>
<DT><EM>MaxFlowEdges</EM></DT>
<DD>list denoting edges with non-zero flow (form: Flow-Edge)
</DD>
<DT><EM>MaxFlowEdgesGraph</EM></DT>
<DD>a graph structure, original nodes (as in Graph) but only the edges that are in max flow
</DD>
</DL>
<H2>Description</H2>
This predicate provides an implementation of the Ford-Fulkerson max-flow algorithm between two nodes in a graph. It the returns the maximal achievable flow allowed by the capacities in the network, a list of all edges with non-zero flow, and a graph of the edges with non-zero flow.
<H2>See Also</H2>
<A HREF="../../lib_public/max_flow/max_flow-5.html">max_flow / 5</A>, <A HREF="../../lib_public/max_flow/max_flow-7.html">max_flow / 7</A>, <A HREF="../../lib_public/max_flow_eplex/max_flow_eplex-5.html">max_flow_eplex : max_flow_eplex / 5</A>, <A HREF="../../lib_public/max_flow_eplex/max_flow_eplex_dual-5.html">max_flow_eplex : max_flow_eplex_dual / 5</A>, <A HREF="../../lib_public/max_flow_eplex/max_flow_eplex_dual-7.html">max_flow_eplex : max_flow_eplex_dual / 7</A>, <A HREF="../../lib_public/all_min_cuts/all_min_cuts-8.html">all_min_cuts : all_min_cuts / 8</A>, <A HREF="../../lib_public/all_min_cuts/all_min_cuts-9.html">all_min_cuts : all_min_cuts / 9</A>, <A HREF="../../lib_public/all_min_cuts/all_min_cuts_list-5.html">all_min_cuts : all_min_cuts_list / 5</A>, <A HREF="../../lib_public/all_min_cuts_eplex/all_min_cuts_eplex-7.html">all_min_cuts_eplex : all_min_cuts_eplex / 7</A>, <A HREF="../../lib_public/all_min_cuts_eplex/all_min_cuts_eplex-8.html">all_min_cuts_eplex : all_min_cuts_eplex / 8</A>
</BODY></HTML>
